package com.epam.necklace.view.menu.mainmenu.submenu.submenugems;

import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;

import com.epam.necklace.view.menu.Menu;
import com.epam.necklace.view.menu.MenuItem;
import com.epam.necklace.view.menu.mainmenu.submenu.BackMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenugems.order3menu.AquamarineMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenugems.order3menu.BerylMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenugems.order3menu.ZirconMenu;


public class Order3 extends MenuItem {
	private static final Logger log = Logger.getLogger(Order3.class);

	private final Menu subMenu;
	private static final List<MenuItem> items;

	static {
		items = new ArrayList<MenuItem>();
		items.add(new AquamarineMenu());
		items.add(new BerylMenu());
		items.add(new ZirconMenu());
		items.add(new BackMenu());
	}

	public Order3() {
		super("Third-order", "3");
		subMenu = new Menu(items);
	}

	@Override
	public boolean execute() {
		log.info("Third-order comand");
		subMenu.run();
		return true;
	}

}
